<?php

/**
* Module change logs
* 09/29/2010        immanuel192         First create, based on Linklist module
* 
* 
*/

if (!defined('EXPONENT')) exit('');

$link = null;

if (isset($_GET['id'])) {
    $_GET['id']=intval($_GET['id']); // antisql injection
	$link = $db->selectObject('imageslider_image','id='.$_GET['id']);
	if ($link) {
		$loc = unserialize($link->location_data);
	}
}

if ($link) {
    // this module has only 2 permissions: configure & administrate
	if (exponent_permissions_check('administrate',$loc)) {
		$db->delete('imageslider_image','id='.$link->id);
		exponent_flow_redirect();
	} else {
		echo SITE_403_HTML;
	}
} else {
	echo SITE_404_HTML;
}

?>
